aux_source_directory(. DIR_TOOL_SRCS)

if(MSVC)
  include_directories(
    "D:/UserDev/Qt Widget/curl-7.61.1/builds/libcurl-vc15-x64-release-dll-zlib-dll-ipv6-sspi-winssl/include"
    )
  link_directories(
    "D:/UserDev/Qt Widget/curl-7.61.1/builds/libcurl-vc15-x64-release-dll-zlib-dll-ipv6-sspi-winssl/lib"
    )
endif()
if(MINGW)
  message("define mingw")
  # do something
  include_directories(
    "D:/UserDev/Qt Widget/curl-7.61.1/builds/libcurl-vc15-x64-release-dll-zlib-dll-ipv6-sspi-winssl/include"
    )
endif()

find_package(Qt5Core)

add_library(tool_request ${DIR_TOOL_SRCS})

if(MSVC)
  target_link_libraries(tool_request libcurl)
endif()

if(MINGW)
  target_link_libraries(tool_request "libcurl_imp.dll")
endif()

if(UNIX)
  target_link_libraries(tool_request -lcurl)
endif()
